package com.xyongfeng.foodManagement.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName food_category_view
 */
@TableName(value ="t_food_category_view")
@Data
public class FoodCategoryView implements Serializable {
    /**
     * 
     */
    private Integer foodId;

    /**
     * 
     */
    private String foodName;

    /**
     * 
     */
    private Integer foodStock;

    /**
     * 
     */
    private String categoryName;

    /**
     * 
     */
    private Long categoryCount;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FoodCategoryView other = (FoodCategoryView) that;
        return (this.getFoodId() == null ? other.getFoodId() == null : this.getFoodId().equals(other.getFoodId()))
            && (this.getFoodName() == null ? other.getFoodName() == null : this.getFoodName().equals(other.getFoodName()))
            && (this.getFoodStock() == null ? other.getFoodStock() == null : this.getFoodStock().equals(other.getFoodStock()))
            && (this.getCategoryName() == null ? other.getCategoryName() == null : this.getCategoryName().equals(other.getCategoryName()))
            && (this.getCategoryCount() == null ? other.getCategoryCount() == null : this.getCategoryCount().equals(other.getCategoryCount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFoodId() == null) ? 0 : getFoodId().hashCode());
        result = prime * result + ((getFoodName() == null) ? 0 : getFoodName().hashCode());
        result = prime * result + ((getFoodStock() == null) ? 0 : getFoodStock().hashCode());
        result = prime * result + ((getCategoryName() == null) ? 0 : getCategoryName().hashCode());
        result = prime * result + ((getCategoryCount() == null) ? 0 : getCategoryCount().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", foodId=").append(foodId);
        sb.append(", foodName=").append(foodName);
        sb.append(", foodStock=").append(foodStock);
        sb.append(", categoryName=").append(categoryName);
        sb.append(", categoryCount=").append(categoryCount);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}